package com.flyme.module.base.provider.service.impl;

import com.flyme.core.base.supper.service.impl.BaseServiceImpl;
import com.flyme.module.base.client.entity.SysUserEduation;
import com.flyme.module.base.provider.mapper.SysUserEduationMapper;
import com.flyme.module.base.provider.service.SysUserEduationService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserEduationServiceImpl extends BaseServiceImpl<SysUserEduationMapper, SysUserEduation> implements SysUserEduationService {


    /**
     * 根据用户查询教育经历
     */
    @Override
    public List<SysUserEduation> selectByUserId(Long userId) {
        return list(q().eq("userId", userId).orderByDesc("createTime"));
    }


    /**
     * 根据用户查询教育经历
     */
    @Override
    public List<SysUserEduation> selectLeavelByUserId(Long userId) {
        return list(q().select("qualifiLeavel").eq("userId", userId).orderByDesc("createTime"));
    }


}
